button: Fix label alignment in checks and radios
authorMatthias Clasen <mclasen@redhat.com>
Sat, 7 Oct 2017 02:32:53 +0000 (22:32 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 7 Oct 2017 02:32:53 +0000 (22:32 -0400)
Yes, this is ugly, but the alternative is broken ui.

gtk/gtkbutton.c

index 998041345cfa05de37500cf0bab8307c85646b18..32764d82b68dd393fbeb778709db4c75507fafab 100644 (file)
@@ -921,6 +921,10 @@ gtk_button_set_label (GtkButton   *button,
           gtk_label_set_use_underline (GTK_LABEL (child), priv->use_underline);
           gtk_label_set_mnemonic_widget (GTK_LABEL (child), GTK_WIDGET (button));
         }
+      if (GTK_IS_CHECK_BUTTON (button))
+        {
+          gtk_label_set_xalign (GTK_LABEL (child), 0.0);
+        }
       gtk_container_add (GTK_CONTAINER (button), child);
       gtk_style_context_remove_class (context, "image-button");
       gtk_style_context_add_class (context, "text-button");